using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace Slqj.Data
{
	public static class TableOrders
	{
		public const string Table = "Orders";
		public const string OrdersID = "OrdersID";
		public const string MembersID = "MembersID";
		public const string MemberName = "MemberName";
		public const string Contact = "Contact";
		public const string OrderStatusID = "OrderStatusID";
		public const string OrderTypeID = "OrderTypeID";
		public const string OrdersNo = "OrdersNo";
		public const string OrderDate = "OrderDate";
		public const string Description = "Description";
		public const string TotalAmount = "TotalAmount";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
		public const string TelePhone = "TelePhone";
		public const string Mobile = "Mobile";
		public const string TradeNo = "TradeNo";
		public const string PayInfo = "PayInfo";
		public const string PayDate = "PayDate";
		public const string MemberNo = "MemberNo";
		public const string PreOrderStatusID = "PreOrderStatusID";
	}
	
	[Serializable]
	public class BaseOrders
		: IDbSessionEntity, IJsonClass
	{
		int m_OrdersID;
		/// <summary>
        /// 订单表ID
        /// </summary>
        public int OrdersID
        {
            get { return m_OrdersID; }
            set { m_OrdersID = value; }
        }
		
		int m_MembersID;
		/// <summary>
        /// 会员表ID
        /// </summary>
        public int MembersID
        {
            get { return m_MembersID; }
            set { m_MembersID = value; }
        }
		
		string m_MemberName;
		/// <summary>
        /// 会员名称
        /// </summary>
        public string MemberName
        {
            get { return m_MemberName; }
            set { m_MemberName = value; }
        }
		
		string m_Contact;
		/// <summary>
        /// 联系人
        /// </summary>
        public string Contact
        {
            get { return m_Contact; }
            set { m_Contact = value; }
        }
		
		int? m_OrderStatusID;
		/// <summary>
        /// 订单状态表ID
        /// </summary>
        public int? OrderStatusID
        {
            get { return m_OrderStatusID; }
            set { m_OrderStatusID = value; }
        }
		
		int? m_OrderTypeID;
		/// <summary>
        /// 订单类型表ID
        /// </summary>
        public int? OrderTypeID
        {
            get { return m_OrderTypeID; }
            set { m_OrderTypeID = value; }
        }
		
		string m_OrdersNo;
		/// <summary>
        /// 订单编号
        /// </summary>
        public string OrdersNo
        {
            get { return m_OrdersNo; }
            set { m_OrdersNo = value; }
        }
		
		DateTime m_OrderDate;
		/// <summary>
        /// 订单时间
        /// </summary>
        public DateTime OrderDate
        {
            get { return m_OrderDate; }
            set { m_OrderDate = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 景点描述
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		double m_TotalAmount;
		/// <summary>
        /// 总金额
        /// </summary>
        public double TotalAmount
        {
            get { return m_TotalAmount; }
            set { m_TotalAmount = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 创建人ID
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 创建人名称
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 修改人
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 修改人ID
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		string m_TelePhone;
		/// <summary>
        /// 
        /// </summary>
        public string TelePhone
        {
            get { return m_TelePhone; }
            set { m_TelePhone = value; }
        }
		
		string m_Mobile;
		/// <summary>
        /// 
        /// </summary>
        public string Mobile
        {
            get { return m_Mobile; }
            set { m_Mobile = value; }
        }
		
		string m_TradeNo;
		/// <summary>
        /// 
        /// </summary>
        public string TradeNo
        {
            get { return m_TradeNo; }
            set { m_TradeNo = value; }
        }
		
		string m_PayInfo;
		/// <summary>
        /// 
        /// </summary>
        public string PayInfo
        {
            get { return m_PayInfo; }
            set { m_PayInfo = value; }
        }
		
		DateTime? m_PayDate;
		/// <summary>
        /// 
        /// </summary>
        public DateTime? PayDate
        {
            get { return m_PayDate; }
            set { m_PayDate = value; }
        }
		
		string m_MemberNo;
		/// <summary>
        /// 
        /// </summary>
        public string MemberNo
        {
            get { return m_MemberNo; }
            set { m_MemberNo = value; }
        }
		
		int m_PreOrderStatusID;
		/// <summary>
        /// 
        /// </summary>
        public int PreOrderStatusID
        {
            get { return m_PreOrderStatusID; }
            set { m_PreOrderStatusID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_OrdersID = reader[TableOrders.OrdersID];
            m_MembersID = reader[TableOrders.MembersID];
            m_MemberName = reader[TableOrders.MemberName];
            m_Contact = reader[TableOrders.Contact];
            m_OrderStatusID = reader[TableOrders.OrderStatusID];
            m_OrderTypeID = reader[TableOrders.OrderTypeID];
            m_OrdersNo = reader[TableOrders.OrdersNo];
            m_OrderDate = reader[TableOrders.OrderDate];
            m_Description = reader[TableOrders.Description];
            m_TotalAmount = reader[TableOrders.TotalAmount];
            m_Creater = reader[TableOrders.Creater];
            m_CreatedBy = reader[TableOrders.CreatedBy];
            m_Created = reader[TableOrders.Created];
            m_Modified = reader[TableOrders.Modified];
            m_ModifiedBy = reader[TableOrders.ModifiedBy];
            m_ModifiedByID = reader[TableOrders.ModifiedByID];
            m_TelePhone = reader[TableOrders.TelePhone];
            m_Mobile = reader[TableOrders.Mobile];
            m_TradeNo = reader[TableOrders.TradeNo];
            m_PayInfo = reader[TableOrders.PayInfo];
            m_PayDate = reader[TableOrders.PayDate];
            m_MemberNo = reader[TableOrders.MemberNo];
            m_PreOrderStatusID = reader[TableOrders.PreOrderStatusID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableOrders.OrdersID, PrimaryKeyType.Identity, OrdersID);
			writer[TableOrders.MembersID] = MembersID;
			writer[TableOrders.MemberName] = MemberName;
			writer[TableOrders.Contact] = Contact;
			writer[TableOrders.OrderStatusID] = OrderStatusID;
			writer[TableOrders.OrderTypeID] = OrderTypeID;
			writer[TableOrders.OrdersNo] = OrdersNo;
			writer[TableOrders.OrderDate] = OrderDate;
			writer[TableOrders.Description] = Description;
			writer[TableOrders.TotalAmount] = TotalAmount;
			writer[TableOrders.Creater] = Creater;
			writer[TableOrders.CreatedBy] = CreatedBy;
			writer[TableOrders.Created] = Created;
			writer[TableOrders.Modified] = Modified;
			writer[TableOrders.ModifiedBy] = ModifiedBy;
			writer[TableOrders.ModifiedByID] = ModifiedByID;
			writer[TableOrders.TelePhone] = TelePhone;
			writer[TableOrders.Mobile] = Mobile;
			writer[TableOrders.TradeNo] = TradeNo;
			writer[TableOrders.PayInfo] = PayInfo;
			writer[TableOrders.PayDate] = PayDate;
			writer[TableOrders.MemberNo] = MemberNo;
			writer[TableOrders.PreOrderStatusID] = PreOrderStatusID;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_OrdersID = idd;
        }
		
		public string TableName
        {
            get { return TableOrders.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_OrdersID = hashToRead["OrdersID"];
			 
             m_MembersID = hashToRead["MembersID"];
			 
             m_MemberName = hashToRead["MemberName"];
			 
             m_Contact = hashToRead["Contact"];
			 
             m_OrderStatusID = hashToRead["OrderStatusID"];
			 
             m_OrderTypeID = hashToRead["OrderTypeID"];
			 
             m_OrdersNo = hashToRead["OrdersNo"];
			 
             m_OrderDate = hashToRead["OrderDate"];
			 
             m_Description = hashToRead["Description"];
			 
             m_TotalAmount = hashToRead["TotalAmount"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
             m_TelePhone = hashToRead["TelePhone"];
			 
             m_Mobile = hashToRead["Mobile"];
			 
             m_TradeNo = hashToRead["TradeNo"];
			 
             m_PayInfo = hashToRead["PayInfo"];
			 
             m_PayDate = hashToRead["PayDate"];
			 
             m_MemberNo = hashToRead["MemberNo"];
			 
             m_PreOrderStatusID = hashToRead["PreOrderStatusID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["OrdersID"] = OrdersID;
			 
            hashToFill["MembersID"] = MembersID;
			 
            hashToFill["MemberName"] = MemberName;
			 
            hashToFill["Contact"] = Contact;
			 
            hashToFill["OrderStatusID"] = OrderStatusID;
			 
            hashToFill["OrderTypeID"] = OrderTypeID;
			 
            hashToFill["OrdersNo"] = OrdersNo;
			 
            hashToFill["OrderDate"] = OrderDate;
			 
            hashToFill["Description"] = Description;
			 
            hashToFill["TotalAmount"] = TotalAmount;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
            hashToFill["TelePhone"] = TelePhone;
			 
            hashToFill["Mobile"] = Mobile;
			 
            hashToFill["TradeNo"] = TradeNo;
			 
            hashToFill["PayInfo"] = PayInfo;
			 
            hashToFill["PayDate"] = PayDate;
			 
            hashToFill["MemberNo"] = MemberNo;
			 
            hashToFill["PreOrderStatusID"] = PreOrderStatusID;
			 
        }

        #endregion
		
	}
}
